//
// Source code recreated from a .class file by IntelliJ IDEA
// (powered by FernFlower decompiler)
//

package 力扣.题库.未分类;

public class demo_3110 {
    public demo_3110() {
    }

    public int scoreOfString(String s) {
        char[] chars = s.toCharArray();
        long sum = 0L;

        for(int i = 0; i < chars.length - 1; ++i) {
            sum += (long)Math.abs(chars[i] - chars[i + 1]);
        }

        return (int)sum;
    }
}
